package com.shop.domain.integral;

import com.alibaba.fastjson.annotation.JSONField;
import com.shop.jpa.domain.BaseDomain;
import com.shop.jpa.support.JpaConst;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>UserPinkBill 实体类</p>
 * <p>Table: t_user_pink_bill - 用户账单表</p>
 * @author generator
 * @date 2021-02-21 04:50:37
 */
@ApiModel("t_pos_send_integral 实体类")
@Data
@Entity
@EntityListeners(AuditingEntityListener.class)
@Table(name = "t_pos_send_integral")
@SQLDelete(sql = "update t_pos_send_integral set is_deleted = 1 where id = ?")
@Where(clause = JpaConst.WHERE_CLAUSE_NOT_DELETED)
@DynamicInsert(true)
@DynamicUpdate(true)
public class PosSendIntegral extends BaseDomain implements Serializable {

    @ApiModelProperty(value = "id", hidden = true)
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	@JSONField(serialize=false)
    private Long id;

    /**
	 * 订单号
	 */
    @ApiModelProperty("订单号")
	@Column(name = "order_no")
    private String orderNo;

    /**
     * 手机号
     */
    @ApiModelProperty("手机号")
    @Column(name = "mobile")
    private String mobile;


    /**
     * 金额
     */
    @ApiModelProperty("金额")
    @Column(name = "tran_price")
    private BigDecimal tranPrice;

    /**
     * 系统汇率配置
     */
    @ApiModelProperty("系统汇率配置")
    @Column(name = "tran_price_rate")
    private BigDecimal tranPriceRate;

    /**
     * 交易时间
     */
    @ApiModelProperty("交易时间")
    @Column(name = "tran_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date tranTime;



    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
	 * 是否删除
	 */
    @ApiModelProperty("是否删除")
	@Column(name = "is_deleted")
    @JSONField(serialize=false)
    private Integer isDeleted;
}